package com.jingdianjichi.wx.enums;

/**
 * WxMspTypeEnum 类
 *
 * @author 熊苏鹏1
 * @date 2025/3/3 21:08
 * @description 微信消息类型枚举类
 */
public enum WxMspTypeEnum {
    SUBSCIBE("event.subscribe","用户订阅事件"),
    TEXt("text","用户接收消息"),
    ;
    private String type;
    private String desc;

    WxMspTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }
    public static WxMspTypeEnum getByType(String type){
        for (WxMspTypeEnum value : WxMspTypeEnum.values()) {
            if(value.getType().equals(type)){
                return value;
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
